//
//  EnterHondaViewController.m
//  HomePage
//
//  Created by xiong qi on 13-5-5.
//  Copyright (c) 2013年 winston. All rights reserved.
//

#import "EnterHondaViewController.h"
#import "BrandDetailViewController.h"
#import "TechnologyViewController.h"


@interface EnterHondaViewController ()

@end

@implementation EnterHondaViewController

-(id)initWithFrame:(CGRect)frame
{
    self = [super init];
    if (self) {
        self.view.frame = frame;
        [self.view setBackgroundColor:[UIColor whiteColor]];
        
        UIImageView * background = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0,1024, 768)];
        [self.view addSubview:background];
        [background release];
        [background setImage:[UIImage imageNamed:@"AllAuto_Image_BG"]];
        
        UIButton *  backBtn = [[UIButton alloc]initWithFrame:CGRectMake(50, 18, 55,40)];
        [backBtn setImage:[UIImage imageNamed:@"home_button"] forState:UIControlStateNormal];
        [backBtn addTarget:self action:@selector(onBack:) forControlEvents:UIControlEventTouchUpInside];
        [self.view addSubview:backBtn];
        [backBtn release];
        
        UILabel * titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(160, 25, 400, 35)];
        titleLabel.backgroundColor = [UIColor clearColor];
        titleLabel.textAlignment = NSTextAlignmentLeft;
        titleLabel.font = [UIFont fontWithName:@"Arial" size:30];
        titleLabel.textColor = [UIColor colorWithRed:0.4 green:0.4 blue:0.4 alpha:1.0];
        [self.view addSubview:titleLabel];
        [titleLabel release];
        [titleLabel setText:@"走进广汽"];
        
        UIImageView * lineView = [[UIImageView alloc] initWithFrame:CGRectMake((frame.size.width-658)/2,70, 658, 8)];
        lineView.image = [UIImage imageNamed:@"AllAuto_Config_TimeLine_BG"];
        [self.view addSubview:lineView];
        [lineView release];

        
        
//        corporateview = [[CorporateView alloc] initWithFrame:CGRectMake(0, 110, frame.size.width, frame.size.height-120)];
//        [self.view addSubview:corporateview];
//        [corporateview release];
        

    }
    return self;
}

-(void)onBack:(id)sender
{
    [self.navigationController popToRootViewControllerAnimated:YES];
}

//-(void)onGoBrandPage:(NSNotification*)notify
//{
//    NSDictionary * dic = (NSDictionary *)[notify object];
//    BrandDetailViewController * Controller = [[BrandDetailViewController alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height) Object:dic];
//    [self.navigationController pushViewController:Controller animated:YES];
//    [Controller release];
//}

//-(void)onGoTechnologyPage:(NSNotification*)notify
//{
//    NSDictionary * dic = (NSDictionary *)[notify object];
//    TechnologyViewController * Controller = [[TechnologyViewController alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height) Object:dic];
//    [self.navigationController pushViewController:Controller animated:YES];
//    [Controller release];
//}

//-(void)onOptionClick:(UIButton *)sender
//{
//    if (sender.tag == 1) {
//        [btn_Corporate setTitleColor:[UIColor colorWithRed:0.4  green:0.4  blue:0.4  alpha:1.0] forState:UIControlStateNormal];
////        [btn_Technology setTitleColor:[UIColor colorWithRed:0.6  green:0.6  blue:0.6  alpha:1.0] forState:UIControlStateNormal];
//        [btn_Brand setTitleColor:[UIColor colorWithRed:0.6  green:0.6  blue:0.6  alpha:1.0] forState:UIControlStateNormal];
//        imageLogo.frame = CGRectMake(5, 6, 12, 13);
//        [self.view addSubview:corporateview];
//        if (brandview.superview) {
//            [brandview removeFromSuperview];
//        }
////        if (technologyview.superview) {
////            [technologyview removeFromSuperview];
////        }
//    }
////    else if (sender.tag == 2) {
////        [btn_Corporate setTitleColor:[UIColor colorWithRed:0.6  green:0.6  blue:0.6  alpha:1.0] forState:UIControlStateNormal];
////        [btn_Technology setTitleColor:[UIColor colorWithRed:0.4  green:0.4  blue:0.4  alpha:1.0] forState:UIControlStateNormal];
////        [btn_Brand setTitleColor:[UIColor colorWithRed:0.6  green:0.6  blue:0.6  alpha:1.0] forState:UIControlStateNormal];
////        imageLogo.frame = CGRectMake(120, 6, 12, 13);
////        [self.view addSubview:technologyview];
////        if (brandview.superview) {
////            [brandview removeFromSuperview];
////        }
////        if (corporateview.superview) {
////            [corporateview removeFromSuperview];
////        }
////    }
//    else
//    {
//        [btn_Corporate setTitleColor:[UIColor colorWithRed:0.6  green:0.6  blue:0.6  alpha:1.0] forState:UIControlStateNormal];
////        [btn_Technology setTitleColor:[UIColor colorWithRed:0.6  green:0.6  blue:0.6  alpha:1.0] forState:UIControlStateNormal];
//        [btn_Brand setTitleColor:[UIColor colorWithRed:0.4  green:0.4  blue:0.4  alpha:1.0] forState:UIControlStateNormal];
//        
//        imageLogo.frame = CGRectMake(125, 6, 12, 13);
//        [self.view addSubview:brandview];
//        if (corporateview.superview) {
//            [corporateview removeFromSuperview];
//        }
////        if (technologyview.superview) {
////            [technologyview removeFromSuperview];
////        }
//    }
//}

-(void)dealloc
{
//    [[NSNotificationCenter defaultCenter]removeObserver:self];
//    [brandview release];
//    [corporateview release];
//    [technologyview release];
    [super dealloc];
}

@end
